-- GENERATED SPELL FOR [Veteran Mage Hunter] --


function spell0_30665(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(13748,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 1000, 1)
end

function spell1_30665(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(20829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 1000, 1)
end

function spell2_30665(pUnit, Event) --@Destroy Door Seal,n/a--
pUnit:FullCastSpellOnTarget(58040,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 0, 1)
end

function spell3_30665(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(12466,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 3000, 1)
end

function spell4_30665(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 3000, 1)
end

function spell5_30665(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15043,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 7000, 1)
end

function spell6_30665(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30665', 7000, 1)
end

function Sorts_30665(pUnit, Event)
local choix_sorts_30665 = math.random(0, 6)
if choix_sorts_30665 == 0 then
pUnit:RegisterEvent('spell0_30665', 1, 1)
end
if choix_sorts_30665 == 1 then
pUnit:RegisterEvent('spell1_30665', 1, 1)
end
if choix_sorts_30665 == 2 then
pUnit:RegisterEvent('spell2_30665', 1, 1)
end
if choix_sorts_30665 == 3 then
pUnit:RegisterEvent('spell3_30665', 1, 1)
end
if choix_sorts_30665 == 4 then
pUnit:RegisterEvent('spell4_30665', 1, 1)
end
if choix_sorts_30665 == 5 then
pUnit:RegisterEvent('spell5_30665', 1, 1)
end
if choix_sorts_30665 == 6 then
pUnit:RegisterEvent('spell6_30665', 1, 1)
end
end

function mob30665_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30665', math.random(1500, 3000), 1)
end

function mob30665_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30665_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30665_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30665, 1, 'mob30665_Action')
RegisterUnitEvent(30665, 2, 'mob30665_Leave')
RegisterUnitEvent(30665, 3, 'mob30665_Kill')
RegisterUnitEvent(30665, 4, 'mob30665_Die')
